#include <jni.h>
#include <string>

using namespace std;

#ifdef __cplusplus
extern "C" {
#endif

jstring Java_com_joshua_jweibo_MainActivity_stringFromJNI(JNIEnv *env, jobject /* this */) {
    string hello = "Hello from C++";
    return env->NewStringUTF(hello.c_str());
}

JNIEXPORT jint JNICALL
Java_com_joshua_jweibo_MainActivity_intFromJNI(JNIEnv *env, jobject instance) {
    int a = 10;
    int b = 2;
    return a + b;
}

#ifdef __cplusplus
}
#endif